<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>demo</title>
    <link rel="stylesheet" href="http://gangneng.free.ngrok.cc/gn-greentax/static/style/style.css">
    <style>
        .list {
            text-align: right;
        }

        .list span {
            width: 45% !important;
            white-space: nowrap;
        }

        .list input {
            width: 45% !important;;
            text-align: left
        }

        .list > p {
            text-align: left
        }

        .xx {
            width: 2rem;
            height: 2rem;
            position: absolute;
            right: 0;
            display: none
        }

        .xz {
            width: 2rem;
            height: 2rem;
            position: absolute;
            right: 0;
            font-size: 1.6rem
        }

        .wc > li {
            margin-top: 1rem;
            box-sizing: border-box;
            padding-bottom: 1rem;
            border-bottom: 1px dotted #C2C2C2;
        }

        .wc > li > ul > li > ul {
            padding-left: 1rem;
        }

        .wc > li > ul > li > ul > li > ul {
            padding-left: 1rem
        }

        .wc > li > ul > li > ul > li > ul > li {
            margin-top: 0.5rem;
            box-sizing: border-box;
            padding-top: 0.5rem;
            border-top: 1px solid #ccc;
        }

        .wc > li > ul > li > ul > li > ul > li:nth-child(1) {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }

        .js {
            background: #65B2F6;
            color: #fff;
            width: auto;
            height: 2.6rem;
            padding: 0 0.8rem;
            margin-top: 1rem
        }

        .yz {
            cursor: pointer;
            z-index: 100;
            display: none;
            position: absolute;
            width: 100%;
            height: 18rem;
            background: cornsilk;
            top: 2.9rem;
            border: 1px solid black;
            overflow-y: auto
        }
        .wrap1{display: none;background: #c4c6c3}
        .wrap1>span{width: 24%;font-size: 1.4rem}
    </style>
</head>
<body>
<header>上海电力股份有限公司吴泾热电厂</header>
<div class="zd">
    <div></div>
</div>
<main>
    <content>
        <div class="content-bottom">
            <div class="content-bottom-header">
                环保税
            </div>
            <div class="list">
                <p>
                    <select>
                        <option value="">江苏省</option>
                    </select>
                    <select>
                        <option value="">南京市</option>
                    </select>
                    <select>
                        <option value="">江宁区</option>
                    </select>
                </p>
                <select class="stype">
                    <option value="Atmosphere">大气污染物</option>
                    <option value="Water">水污染物</option>
                    <option value="Solid">固废污染物</option>
                    <option value="Noise">噪声</option>
                </select>
                <button class="tj">添加</button>
                <button class="sc">删除</button>
                <ul class="wc">
                    <li></li>
                    <li style="position: relative">
                        <button class="xx" style="top:0">-</button>
                        <ul>
                            <li><span>税目:</span><input type="text" class="sm" name="1" value="大气污染物"
                                                       disabled="disabled"></li>
                            <li style="position: relative">
                                <ul>
                                    <li><span>排放口名称:</span><input class="portName" type="text"></li>
                                    <li>
                                        <ul class="wc2">
                                            <li></li>
                                            <li style="position: relative" class="emissionsList">
                                                <div class="yz"></div>
                                                <button class="xz">+</button>
                                                <button class="xx">-</button>
                                                <span style="width: 24%">污染因子:</span><select class="select2">
                                                <option value="a20016">铍及其化合物</option>
                                                <option value="a20025">镉及其化合物</option>
                                                <option value="a20043">铅及其化合物</option>
                                                <option value="a20057">汞及其化合物</option>
                                                <option value="a20063">镍及其化合物</option>
                                                <option value="a20091">锡及其化合物</option>
                                                <option value="a21002">氮氧化物</option>
                                                <option value="a21005">一氧化碳</option>
                                                <option value="a21018">氟化物</option>
                                                <option value="a21022">氯气</option>
                                                <option value="a21024">氯化氢</option>
                                                <option value="a21026">二氧化硫</option>
                                                <option value="a23001">酚类</option>
                                                <option value="a24046">氯乙烯</option>
                                                <option value="a25002">苯</option>
                                                <option value="a25003">甲苯</option>
                                                <option value="a25005">二甲苯</option>
                                                <option value="a25023">硝基苯</option>
                                                <option value="a25044">苯并[a]芘</option>
                                                <option value="a26001">苯胺类</option>
                                                <option value="a30001">甲醇</option>
                                                <option value="a31001">甲醛</option>
                                                <option value="a31002">乙醛</option>
                                                <option value="a34013">烟尘</option>
                                                <option value="a34038">沥青烟</option>
                                                <option value="a34039">硫酸雾</option>
                                                <option value="a34040">铬酸雾</option>
                                                <option value="a99010">丙烯腈</option>
                                                <option value="a99049">光气</option>
                                                <option value="a99051">二硫化碳</option>
                                                <option value="aa0001">氰化氢</option>
                                                <option value="aa0002">一般性粉</option>
                                                <option value="aa0003">石棉尘</option>
                                                <option value="aa0004">破璃棉尘</option>
                                                <option value="aa0005">碳黑尘</option>
                                                <option value="aa0006">丙烯醛</option>
                                                <option value="aa0007">氯苯类</option>
                                                <option value="aa0008">硫化氩</option>
                                                <option value="aa0009">氣</option>
                                                <option value="aa0010">三甲胺</option>
                                                <option value="aa0011">甲硫醇</option>
                                                <option value="aa0012">甲硫醚</option>
                                                <option value="aa0013">二甲二硫</option>
                                                <option value="aa0014">苯乙烯</option>
                                            </select>
                                                <span style="width: 24%">排放量</span><input placeholder="污染物排放量(千克)"
                                                                                          style="width: 24%"
                                                                                          type="text">
                                                <span style="width: 24%">浓度</span><select class="select">
                                                <option value="1正常">正常</option>
                                                <option value="2低于国家和地方规定30%">低于国家和地方规定30%</option>
                                                <option value="3低于国家和地方规定50%">低于国家和地方规定50%</option>
                                            </select>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
                <button class="js">计算</button>
                <!--<button class="js js1">计算并汇总</button>-->
            </div>
            <div class="list lists">
                <table cellspacing="0">
                    <thead>
                    <tr>
                        <th>税目</th>
                        <th>排放口</th>
                        <th>总税额</th>
                    </tr>
                    </thead>
                    <tbody class="tbody">
                    </tbody>
                </table>
            </div>
        </div>
    </content>
</main>
<wrap>
    <ul></ul>
</wrap>
<div class="qx">×</div>
<nav>
    <ul>
        <li class="aaa"><i class="icon iconfont">&#xe6ab;</i><br><a href="index3.html">申报表</a></li>
        <li><i class="icon iconfont">&#xe684;</i><br><a href="index11.html">申报计算表</a></li>
        <li><i class="icon iconfont">&#xe72b;</i><br><a href="index3.html">我要计算</a></li>
    </ul>
</nav>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script>
    $(function () {
        $(".aaa").click(function () {
            alert("敬请期待")
        });
        var Atmosphere = '\n' +
            '                    <li  style="position: relative"  >\n' +
            '                        <button class="xx" style="top:0">-</button>\n' +
            '                        <ul>\n' +
            '                            <li><span>税目:</span><input type="text" class="sm" name="1" value="大气污染物" disabled="disabled"></li>\n' +
            '                            <li  style="position: relative" >\n' +
            '                                <ul>\n' +
            '                                    <li><span>排放口名称:</span><input class="portName" type="text"></li>\n' +
            '                                    <li>\n' +
            '                                        <ul class="wc2">\n' +
            '                                            <li></li>\n' +
            '                                            <li style="position: relative" class="emissionsList">\n' +
            '                                            <div class="yz"></div>\n' +
            '                                                <button class="xz">+</button>\n' +
            '                                                <button class="xx">-</button>\n' +
            '                                                <span style="width: 24%">污染因子:</span><select class="select2">\n' +
            '                                                <option value="a20016">铍及其化合物</option>\n' +
            '                                                <option value="a20025">镉及其化合物</option>\n' +
            '                                                <option value="a20043">铅及其化合物</option>\n' +
            '                                                <option value="a20057">汞及其化合物</option>\n' +
            '                                                <option value="a20063">镍及其化合物</option>\n' +
            '                                                <option value="a20091">锡及其化合物</option>\n' +
            '                                                <option value="a21002">氮氧化物</option>\n' +
            '                                                <option value="a21005">一氧化碳</option>\n' +
            '                                                <option value="a21018">氟化物 </option>\n' +
            '                                                <option value="a21022">氯气  </option>\n' +
            '                                                <option value="a21024">氯化氢</option>\n' +
            '                                                <option value="a21026">二氧化硫</option>\n' +
            '                                                <option value="a23001">酚类</option>\n' +
            '                                                <option value="a24046">氯乙烯</option>\n' +
            '                                                <option value="a25002">苯 </option>\n' +
            '                                                <option value="a25003">甲苯</option>\n' +
            '                                                <option value="a25005">二甲苯</option>\n' +
            '                                                <option value="a25023">硝基苯</option>\n' +
            '                                                <option value="a25044">苯并[a]芘</option>\n' +
            '                                                <option value="a26001">苯胺类</option>\n' +
            '                                                <option value="a30001">甲醇</option>\n' +
            '                                                <option value="a31001">甲醛</option>\n' +
            '                                                <option value="a31002">乙醛</option>\n' +
            '                                                <option value="a34013">烟尘</option>\n' +
            '                                                <option value="a34038">沥青烟</option>\n' +
            '                                                <option value="a34039">硫酸雾</option>\n' +
            '                                                <option value="a34040">铬酸雾</option>\n' +
            '                                                <option value="a99010">丙烯腈</option>\n' +
            '                                                <option value="a99049">光气</option>\n' +
            '                                                <option value="a99051">二硫化碳</option>\n' +
            '                                                <option value="aa0001">氰化氢</option>\n' +
            '                                                <option value="aa0002">一般性粉</option>\n' +
            '                                                <option value="aa0003">石棉尘</option>\n' +
            '                                                <option value="aa0004">破璃棉尘</option>\n' +
            '                                                <option value="aa0005">碳黑尘</option>\n' +
            '                                                <option value="aa0006">丙烯醛</option>\n' +
            '                                                <option value="aa0007">氯苯类</option>\n' +
            '                                                <option value="aa0008">硫化氩</option>\n' +
            '                                                <option value="aa0009">氣</option>\n' +
            '                                                <option value="aa0010">三甲胺</option>\n' +
            '                                                <option value="aa0011">甲硫醇</option>\n' +
            '                                                <option value="aa0012">甲硫醚</option>\n' +
            '                                                <option value="aa0013">二甲二硫</option>\n' +
            '                                                <option value="aa0014">苯乙烯</option>\n' +
            '                                            </select>\n' +
            '                                                <span  style="width: 24%">排放量</span><input placeholder="污染物排放量(千克)" style="width: 24%" type="text">\n' +
            '                                                <span  style="width: 24%">浓度</span><select class="select"> <option value="1正常">正常</option>\n' +
            '                                                     <option value="2低于国家和地方规定30%">低于国家和地方规定30%</option>\n' +
            '                                                     <option value="3低于国家和地方规定50%">低于国家和地方规定50%</option></select>\n' +
            '                                            </li>\n' +
            '                                        </ul>\n' +
            '                                    </li>\n' +
            '                                </ul>\n' +
            '                            </li>\n' +
            '                        </ul>\n' +
            '                    </li>';
        var Water = '\n' +
            '                    <li  style="position: relative"  >\n' +
            '                        <button class="xx" style="top:0">-</button>\n' +
            '                        <ul>\n' +
            '                            <li><span>税目:</span><input type="text" name="2" class="sm" value="水污染物" disabled="disabled"></li>\n' +
            '                            <li  style="position: relative" >\n' +
            '                                <ul>\n' +
            '                                    <li><span>排放口名称:</span><input class="portName" type="text"></li>\n' +
            '                                    <li>\n' +
            '                                        <ul class="wc2">\n' +
            '                                            <li></li>\n' +
            '                                            <li style="position: relative" class="emissionsList">\n' +
            '                                            <div class="yz"></div>\n' +
            '                                                <button class="xz">+</button>\n' +
            '                                                <button class="xx">-</button>\n' +
            '                                                <span style="width: 24%">污染因子:</span><select  class="select2">' +
            '<option value="ww1001">pH值 0-1，13-14</option>' +
            '<option value="ww1002">pH值 1-2，12-13</option>' +
            '<option value="ww1003">pH值 2-3，11-12</option>' +
            '<option value="ww1004">pH值 3-4，10-11</option>' +
            '<option value="ww1005">pH值 4-5，9-10</option>' +
            '<option value="ww1006">pH值 5-6</option>' +
            '<option value="ww1007">色度</option>' +
            '<option value="ww1008">大肠菌群数（超标）</option>' +
            '<option value="ww1009">余氯量（用氯消毒的医院废水</option>' +
            '<option value="w20111">总汞</option>' +
            '<option value="w20115">总镉</option>' +
            '<option value="w20116">总铬</option>' +
            '<option value="w20117">六价铬</option>' +
            '<option value="w20119">总砷</option>' +
            '<option value="w20120">总铅</option>' +
            '<option value="w20121">总镍</option>' +
            '<option value="w20126">总银</option>' +
            '<option value="w20127">总铍</option>' +
            '<option value="w25043">苯并[α]芘</option>' +
            '<option value="w01012">悬浮物</option>' +
            '<option value="w01017">五日生化需氧量</option>' +
            '<option value="w01018">化学需氧量</option>' +
            '<option value="w01020">总有机碳</option>' +
            '<option value="w19002">阴离子表面活性剂</option>' +
            '<option value="w20122">总铜</option>' +
            '<option value="w20123">总锌</option>' +
            '<option value="w20124">总锰</option>' +
            '<option value="w20128">总硒</option>' +
            '<option value="w21003">氨氮</option>' +
            '<option value="w21011">总磷</option>' +
            '<option value="w21017">氟化物</option>' +
            '<option value="w21019">硫化物</option>' +
            '<option value="w22001">石油类</option>' +
            '<option value="w23002">挥发酚</option>' +
            '<option value="ww0001">动植物油</option>' +
            '<option value="ww0002">总氰化物</option>' +
            '<option value="ww0003">甲醛</option>' +
            '<option value="ww0004">苯胺类</option>' +
            '<option value="ww0005">硝基苯类</option>' +
            '<option value="ww0006">彩色显影剂（CD-2)</option>' +
            '<option value="ww0007">单质磷（以P计算）</option>' +
            '<option value="ww0008">有机磷农药（以P计算)</option>' +
            '<option value="ww0009">乐果</option>' +
            '<option value="ww0010">甲基对硫磷</option>' +
            '<option value="ww0011">马拉硫磷</option>' +
            '<option value="ww0012">对硫磷</option>' +
            '<option value="ww0013">五氯酚及五氯酚钠（以五氯酚计)</option>' +
            '<option value="ww0014">三氯甲烷</option>' +
            '<option value="ww0015">.可吸附有机卤化物</option>' +
            '<option value="ww0016">四氯化碳</option>' +
            '<option value="ww0017">三氯乙烯</option>' +
            '<option value="ww0018">四氯乙烯</option>' +
            '<option value="ww0019">苯</option>' +
            '<option value="ww0020">甲苯</option>' +
            '<option value="ww0021">乙苯</option>' +
            '<option value="ww0022">邻_二甲苯</option>' +
            '<option value="ww0023">对一二甲苯</option>' +
            '<option value="ww0024">间一二甲苯</option>' +
            '<option value="ww0025">氯苯</option>' +
            '<option value="ww0026">邻二氯苯</option>' +
            '<option value="ww0027">对二氯苯.</option>' +
            '<option value="ww0028">对硝基氯苯</option>' +
            '<option value="ww0029">2,4 —二硝基氯苯</option>' +
            '<option value="ww0030">苯酚</option>' +
            '<option value="ww0031">间一甲酚</option>' +
            '<option value="ww0032">2.4—二氯酚 </option>' +
            '<option value="ww0033"> 2.4,6—三氯酚</option>' +
            '<option value="ww0034">邻苯二甲酸二丁酯</option>' +
            '<option value="ww0035">邻苯二甲酸二辛酯</option>' +
            '<option value="ww0036">丙烯腈</option>' +
            '</select>\n' +
            '                                                <span  style="width: 24%">排放量</span><input placeholder="污染物排放量(千克)" style="width: 24%" type="text">\n' +
            '                                                <span  style="width: 24%">浓度</span><select class="select"> <option value="1正常">正常</option>\n' +
            '                                                     <option value="2低于国家和地方规定30%">低于国家和地方规定30%</option>\n' +
            '                                                     <option value="3低于国家和地方规定50%">低于国家和地方规定50%</option></select>\n' +
            '                                            </li>\n' +
            '                                        </ul>\n' +
            '                                    </li>\n' +
            '                                </ul>\n' +
            '                            </li>\n' +
            '                        </ul>\n' +
            '                    </li>';
        var Solid = ' \n' +
            '                    <li  style="position: relative"  >\n' +
            '                        <button class="xx" style="top:0">-</button>\n' +
            '                        <ul>\n' +
            '                            <li><span>税目:</span><input type="text" name="3" class="sm" value="固废污染物" disabled="disabled"></li>\n' +
            '                            <li  style="position: relative" >\n' +
            '                                <button class="xz">+</button>\n' +
            '                                <button class="xx">-</button>\n' +
            '                                <ul>\n' +
            '                                    <li>\n' +
            '                                        <ul class="wc2">\n' +
            '                                            <li></li>\n' +
            '                                            <li  style="position: relative" class="emissionsList">\n' +
            '                                            <div class="yz"></div>\n' +
            '                                                <button class="xz">+</button>\n' +
            '                                                <button class="xx">-</button>\n' +
            '                                                <span style="width: 24%">污染因子:</span><select  class="select2">' +
            '<option value="002001">煤矸石</option>' +
            '<option value="002002">尾矿</option>' +
            '<option value="002003">危险废物</option>' +
            '<option value="002004">冶炼渣、粉煤灰、炉渣、其它固体废物（含半固态、液态废物）</option>' +
            '</select>\n' +
            '                                                <span  style="width: 24%">排放量</span><input placeholder="污染物排放量(吨)" style="width: 24%" type="text">\n' +
            '                                            </li>\n' +
            '                                        </ul>\n' +
            '                                    </li>\n' +
            '                                </ul>\n' +
            '                            </li>\n' +
            '                        </ul>\n' +
            '                    </li>';
        var Noise = '\n' +
            '                    <li  style="position: relative"  >\n' +
            '                        <button class="xx" style="top:0">-</button>\n' +
            '                        <ul>\n' +
            '                            <li><span>税目:</span><input type="text" name="4" class="sm" value="噪声" disabled="disabled"></li>\n' +
            '                            <li  style="position: relative" >\n' +
            '                                <button class="xz">+</button>\n' +
            '                                <button class="xx">-</button>\n' +
            '                                <ul>\n' +
            '                                    <li>\n' +
            '                                        <ul class="wc2">\n' + /*<input type="text" placeholder="噪声超标分贝">*/
            '                                            <li></li>\n' +
            '                                            <li style="position: relative" class="emissionsList">\n' +
            '                                                <button class="xz">+</button>\n' +
            '                                                <button class="xx">-</button>\n' +
            '                                                <span  style="width: 24%">超标分贝</span>' +
            '                                               <select class="select">' +
            '<option value="1 ~ 3 分贝">超标 1 ~ 3 分贝</option>' +
            '<option value="4 ~ 6 分贝">超标 4 ~ 6 分贝</option>' +
            '<option value="7 ~ 9 分贝">超标 7 ~ 9 分贝</option>' +
            '<option value="10 ~ 12 分贝">超标 10 ~ 12 分贝</option>' +
            '<option value="13 ~ 15 分贝">超标 13 ~ 15 分贝</option>' +
            '<option value="16 分贝以上">超标 16 分贝以上</option>' +
            '</select>\n' +
            '                                                <span  style="width: 24%">超标个数</span><input placeholder="噪声超标点位个数(个)" type="text" placeholder="噪声超标点位个数(个)">\n' +
            '                                            </li>\n' +
            '                                        </ul>\n' +
            '                                    </li>\n' +
            '                                </ul>\n' +
            '                            </li>\n' +
            '                        </ul>\n' +
            '                    </li>';
        $(".tj").click(function () {
            var option = $(".stype option:selected").val();
            if (option == "Atmosphere") {
                $(".wc").append(Atmosphere)
            }
            if (option == "Water") {
                $(".wc").append(Water)
            }
            if (option == "Solid") {
                $(".wc").append(Solid)
            }
            if (option == "Noise") {
                $(".wc").append(Noise)
            }
        });
        $(".wc").delegate(".xz", "click", function () {
            var li = $(this).parent("li").clone();
            $(this).parent("li").parent("ul").append(li);
        });
        $(".list").delegate(".xx", "click", function () {
            var lenght = $(this).parent("li").siblings("li").length;
            if (lenght > 1) {
                $(this).parent("li").remove()
            }
        });

        function jishiqi() {
            jishi = setInterval(function () {
                $(".xx").hide(100);
            }, 5000)
        }

        jishiqi();
        $(".sc").click(function () {
            clearInterval(jishi);
            $(".xx").show(100);
            $(".xz").hide(100);
        });
        $(".wc").delegate("input", "click", function () {
            $(".xx").hide(100);
            $(".xz").show(100);
        });
        var arr = [];

        function js() {
            $(".js").click(function () {
                arr = [];
                var lenght = $(".wc>li").length;
                for (var i = 0; i < lenght - 1; i++) {
                    var arr1 = [];
                    var item = $(".wc>li:eq(" + (i + 1) + ")").find(".sm").attr("name");
                    if ((item == "1") || (item == "2")) {
                        arr1.push({"item": item});
                        arr1.push({"areaCode": "123456"});
                        var portName = $(".wc>li:eq(" + (i + 1) + ")").find(".portName").val();
                        arr1.push({"portName": portName});
                        if ($(".wc2>li").length == 2) {
                            var emissionsList = $(".wc>li:eq(" + (i + 1) + ")").find(".emissionsList");
                            var input = emissionsList.children("input").eq(0).val();
                            var select2 = emissionsList.find(".select2 option:selected");
                            var select1 = emissionsList.find(".select option:selected");
                            var select = select1.val();
                            var select2 = select2.val();
                            arr1.push({
                                "emissionsList": {
                                    "pollutantCode": select2,
                                    "emissions": input,
                                    "concentration": select
                                }
                            })
                        }
                        if ($(".wc2>li").length > 2) {
                            var arr2 = [];
                            for (var e = 0; e < $(".wc>li:eq(" + (i + 1) + ") .wc2>li").length - 1; e++) {
                                var li = $(".wc>li:eq(" + (i + 1) + ")");
                                var emissionsList = li.find(".wc2>li").eq(e + 1);
                                var input1 = emissionsList.children("input").eq(0).val();
                                var select2 = emissionsList.find(".select2 option:selected");
                                var select1 = emissionsList.find(".select option:selected");
                                var select = select1.val();
                                var select2 = select2.val();
                                arr2.push({
                                    "pollutantCode": select2,
                                    "emissions": input1,
                                    "concentration": select
                                })
                            }
                            ;
                            arr1.push({"emissionsList": arr2});
                        }
                    }
                    if (item == "3") {
                        arr1.push({"item": item});
                        arr1.push({"areaCode": "123456"});
                        if ($(".wc2>li").length == 2) {
                            var emissionsList = $(".wc>li:eq(" + (i + 1) + ")").find(".emissionsList");
                            var input1 = emissionsList.children("input").eq(0).val();
                            var select1 = emissionsList.find(".select2 option:selected");
                            var select = select1.val();
                            arr1.push({
                                "emissionsList": {
                                    "portName": select,
                                    "emissions": input1
                                }
                            });
                        }
                        if ($(".wc2>li").length > 2) {
                            var arr3 = [];
                            for (var e = 0; e < $(".wc>li:eq(" + (i + 1) + ") .wc2>li").length - 1; e++) {
                                var li = $(".wc>li:eq(" + (i + 1) + ")");
                                var emissionsList = li.find(".wc2>li").eq(e + 1);
                                var input1 = emissionsList.children("input").eq(0).val();
                                var select1 = emissionsList.find(".select2 option:selected");
                                var select = select1.val();
                                arr3.push({
                                    "portName": select,
                                    "emissions": input1
                                })
                            }
                            arr1.push({"emissionsList": arr3})
                        }
                    }
                    if (item == "4") {
                        arr1.push({"item": item});
                        arr1.push({"areaCode": "123456"});
                        if ($(".wc2>li").length == 2) {
                            var emissionsList = $(".wc>li:eq(" + (i + 1) + ")").find(".emissionsList");
                            var input1 = emissionsList.children("input").eq(0).val();
                            var select1 = emissionsList.find(".select option:selected");
                            var select = select1.val();
                            arr1.push({
                                "emissions": select,
                                "concentration": input1
                            })
                        }
                        if ($(".wc2>li").length > 2) {
                            var arr4 = [];
                            for (var e = 0; e < $(".wc>li:eq(" + (i + 1) + ") .wc2>li").length - 1; e++) {
                                var li = $(".wc>li:eq(" + (i + 1) + ")");
                                var emissionsList = li.find(".wc2>li").eq(e + 1);
                                var input1 = emissionsList.children("input").eq(0).val();
                                var select1 = emissionsList.find(".select option:selected");
                                var select = select1.val();
                                arr4.push({
                                    "emissions": select,
                                    "concentration": input1
                                })
                            }
                            arr1.push({"emissionsList": arr4});
                        }
                    };
                }
                console.log(arr1);
                /* $.post("http://gangneng.free.ngrok.cc/gn-greentax/calculation/greentax", {"aaa": arr1}, function (data) {
                    console.log(data["greenTaxDatas"]);
                    List = data["greenTaxDatas"];
                    for (var d = 0; d < List.length; d++) {
                        var item = List[d].item;
                        var portName = List[d].portName;
                        var tax = List[d].tax;
                        $(".tbody").append('<tr><td>' + item + '</td><td>' + portName + '</td><td>' + tax + '</td></tr>');
                    }
                }); */
                var dde = [{
                	  "areaCode":"56789",
                	  "item":"1",
                	  "portName":"COD排放口",
                	  "emissionsList": [{
                	    "pollutantCode": "a20025",
                	    "emissions": "8.7",
                	    "concentration":"1"
                	  },
                	    {
                	    "pollutantCode": "a20057",
                	    "emissions": "11.6",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "a20091",
                	    "emissions": "6.3",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "a21018",
                	    "emissions": "8.8",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "a21026",
                	    "emissions": "9.1",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "a23001",
                	    "emissions": "7",
                	    "concentration":"1"
                	  }]
                	},
                	{
                	  "areaCode":"56789",
                	  "item":"2",
                	  "portName":"234排放口",
                	  "emissionsList": [{
                	    "pollutantCode": "w20115",
                	    "emissions": "8.5",
                	    "concentration":"1"
                	  },
                	    {
                	    "pollutantCode": "w20117",
                	    "emissions": "12",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "w21017",
                	    "emissions": "6.3",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "w23002",
                	    "emissions": "8.8",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "ww0007",
                	    "emissions": "9.1",
                	    "concentration":"1"
                	  },
                	  {
                	    "pollutantCode": "ww0010",
                	    "emissions": "7",
                	    "concentration":"1"
                	  }]
                	},
                	{
                	  "areaCode":"56789",
                	  "item":"3",
                	  "portName":"",
                	  "emissionsList": [{
                	    "pollutantCode": "002001",
                	    "emissions": "88",
                	    "concentration":""
                	  },
                	    {
                	    "pollutantCode": "002004",
                	    "emissions": "96",
                	    "concentration":""
                	  }]
                	},
                	{
                	  "areaCode":"",
                	  "item":"4",
                	  "portName":"",
                	  "emissionsList": [{
                	    "pollutantCode": "003001",
                	    "emissions": "2",
                	    "concentration":""
                	  },
                	    {
                	    "pollutantCode": "003005",
                	    "emissions": "1",
                	    "concentration":""
                	  }]
                	}];
                $.ajax( {
                    url:'http://gangneng.free.ngrok.cc/gn-greentax/calculation/greentax',// 跳转到 action
                    data:{errt:JSON.stringify(dde)},
                    type:'post',
                    cache:false,
                    dataType:'json',
                    success:function(data) {
                        console.log(data["greenTaxDatas"]);
                        List = data["greenTaxDatas"];
                        for (var d = 0; d < List.length; d++) {
                            var item = List[d].item;
                            var portName = List[d].portName;
                            var tax = List[d].tax;
                            $(".tbody").append('<tr><td>' + item + '</td><td>' + portName + '</td><td>' + tax + '</td></tr>');
                        }
                    },
                    error : function() {

                    }
                });
            });
            $(".tbody").delegate('tr','click',function(){
                $("wrap ul").html("");
                var index = $(this).index();
                var detail = List[index].detail;
                $("wrap ul").append("<li><span style='width: 50%'>污染因子</span><span style='width: 25%'>税额</span><span style='width: 25%'>总税额</span></li>" );
                for (var p=0;p<detail.length;p++){
                    $("wrap ul").append("<li><span style='width: 50%'>"+detail[p].pollutantName+"</span>" +
                        "<span style='width: 25%!important;'>"+detail[p].tax+"</span>" +
                        "<span style='width: 25%'>"+detail[p].total+"</span></li>" +
                        "<li class='wrap1'><span>排放量</span><span>"+detail[p].emissions+"</span>" +
                        "<span>当量值</span><span>"+detail[p].equivalentValue+"</span><br>" +
                        "<span>总当量</span><span>"+detail[p].equivalent+"</span>" +
                        "<span>计税单位</span><span>"+detail[p].theTaxUnit+"</span></li>" );

                }
                $("wrap").slideDown();
                $(".qx").slideDown();
            });
        }
        $("wrap>ul").delegate('li','click',function(){
            var index = $(this).index();
            if(index%2 !=0){
                $(this).next().toggle(100);
            }


        });
        $(".qx").click(function () {
            $("wrap").slideUp();
            $(".qx").slideUp();
        });
        js();
//        $(".js1").click(function () {
//            js();
//            window.open("index11.html", "_self")
//        });
    })
</script>
</body>
</html>